<?php
	session_start();
	require("../inc/functions.php");
	if(!isEmployee())
		header("Location: ../index.php");
	require_once("../inc/models/customer_keywords_model.php");
	if(isset($_POST['submit'])){
		$row = $_POST;
		EditCustomerKeyword($row);
		header("Location: index.php");
	}
	else
		$results = GetCustomerKeyword($_REQUEST['id']);
?>

<!DOCTYPE html>
<html lang="en">
	<?php include('../inc/head.php'); ?>
	<body>
	<?php include('../inc/navigation.php'); ?>
			<div class="span9">
				<div class="row-fluid">
					<h2><?=$results['name'] ?></h2>
					
					<form class="well" method="post" action="#">
						<div class="control-group">
			            	<label class="control-label" for="name">Customer Keywords:</label>
			             <div class="controls">
			                <input type="text" name="name" id="name" value="<?=$results['name']?>"/>
			               </div>
			            </div>
			            <input type="hidden" name="id" value="<?=$_GET['id'] ?>" />
						<input type="submit" name="submit" value="Submit" />
					</form>
				</div>
			</div>
		</div>
	</div>
	
	<!-- All Bootstrap JavaScript Files -->
	<script src="../inc/bootstrap/js/jquery.js"></script>
    <script src="../inc/bootstrap/js/bootstrap.js"></script>
	
	</body>
</html>
